package drh.dao.impl;

import java.sql.SQLException;

import org.apache.commons.dbutils.handlers.ScalarHandler;

import drh.dao.BaseDao;
import drh.dao.SuperuserDao;

public class SuperuserDaoImpl extends BaseDao implements SuperuserDao {

	@Override
	public Integer seclectStudentByUsernameAndPwd(String name, String pwd) {
	String sql = "select count(1) from superuser where name=? and pwd=?";
	Object query2;
	try {
		query2 = query.query(sql,new ScalarHandler(),name,pwd);
		return Integer.parseInt(query2.toString());
	} catch (SQLException e) {
		e.printStackTrace();
	}
		return null;
	}
	
}
